databaseChangeLog = {

	changeSet(author: "saqui (generated)", id: "1323425063035-1") {
		createTable(tableName: "attached_file") {
			column(autoIncrement: "true", name: "id", type: "BIGINT") {
				constraints(nullable: "false", primaryKey: "true")
			}

			column(name: "version", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "content_type", type: "VARCHAR(255)")

			column(name: "internal_file_only", type: "BIT") {
				constraints(nullable: "false")
			}

			column(name: "legal_case_id", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "path", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}

			column(name: "files_idx", type: "INT")
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-2") {
		createTable(tableName: "auth_user") {
			column(autoIncrement: "true", name: "id", type: "BIGINT") {
				constraints(nullable: "false", primaryKey: "true")
			}

			column(name: "version", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "account_expired", type: "BIT") {
				constraints(nullable: "false")
			}

			column(name: "account_locked", type: "BIT") {
				constraints(nullable: "false")
			}

			column(name: "company_id", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "email", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}

			column(name: "enabled", type: "BIT") {
				constraints(nullable: "false")
			}

			column(name: "password", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}

			column(name: "password_expired", type: "BIT") {
				constraints(nullable: "false")
			}

			column(name: "username", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}

			column(name: "employees_idx", type: "INT")
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-3") {
		createTable(tableName: "auth_user_role") {
			column(name: "role_id", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "auth_user_id", type: "BIGINT") {
				constraints(nullable: "false")
			}
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-4") {
		createTable(tableName: "classification_property") {
			column(name: "classification_id", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "property_id", type: "BIGINT") {
				constraints(nullable: "false")
			}
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-5") {
		createTable(tableName: "company") {
			column(autoIncrement: "true", name: "id", type: "BIGINT") {
				constraints(nullable: "false", primaryKey: "true")
			}

			column(name: "version", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "contact", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}

			column(name: "email", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}

			column(name: "expiry_date", type: "DATE")

			column(name: "name", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}

			column(name: "number_of_licenses", type: "INT")

			column(name: "phone_number", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-6") {
		createTable(tableName: "deal_type") {
			column(autoIncrement: "true", name: "id", type: "BIGINT") {
				constraints(nullable: "false", primaryKey: "true")
			}

			column(name: "version", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "deal_type", type: "LONGTEXT") {
				constraints(nullable: "false")
			}
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-7") {
		createTable(tableName: "firm") {
			column(autoIncrement: "true", name: "id", type: "BIGINT") {
				constraints(nullable: "false", primaryKey: "true")
			}

			column(name: "version", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "name", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-8") {
		createTable(tableName: "legal_case") {
			column(autoIncrement: "true", name: "id", type: "BIGINT") {
				constraints(nullable: "false", primaryKey: "true")
			}

			column(name: "version", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "comment_on_offers", type: "LONGTEXT")

			column(name: "date_of_statement_of_objections", type: "DATE")

			column(name: "deal_type_id", type: "BIGINT")

			column(name: "decision_date", type: "DATE")

			column(name: "decision_externallink", type: "VARCHAR(255)")

			column(name: "ec_number", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "last_updated", type: "DATETIME")

			column(name: "m_lex_link", type: "VARCHAR(255)")

			column(name: "notification_date", type: "DATE")

			column(name: "ph1offer", type: "VARCHAR(255)")

			column(name: "phase", type: "INT") {
				constraints(nullable: "false")
			}

			column(name: "press_release_comprxserverlink", type: "VARCHAR(255)")

			column(name: "press_release_externallink", type: "VARCHAR(255)")

			column(name: "relative_toso", type: "VARCHAR(255)")

			column(name: "typea", type: "VARCHAR(255)")

			column(name: "typeb", type: "VARCHAR(255)")
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-9") {
		createTable(tableName: "legal_case_firm") {
			column(name: "firm_id", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "legal_case_id", type: "BIGINT") {
				constraints(nullable: "false")
			}
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-10") {
		createTable(tableName: "legal_case_nace_full_description") {
			column(name: "description_id", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "legal_case_id", type: "BIGINT") {
				constraints(nullable: "false")
			}
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-11") {
		createTable(tableName: "legal_case_offer") {
			column(name: "legal_case_offers_id", type: "BIGINT")

			column(name: "offer_id", type: "BIGINT")

			column(name: "offers_idx", type: "INT")
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-12") {
		createTable(tableName: "measure") {
			column(autoIncrement: "true", name: "id", type: "BIGINT") {
				constraints(nullable: "false", primaryKey: "true")
			}

			column(name: "version", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "additional_requirements", type: "VARCHAR(255)")

			column(name: "alternative_remedy", type: "VARCHAR(255)")

			column(name: "cluster_sale", type: "VARCHAR(255)")

			column(name: "comments", type: "LONGTEXT")

			column(name: "competition_concern", type: "VARCHAR(255)")

			column(name: "current_asset", type: "VARCHAR(255)")

			column(name: "full_measure_description", type: "LONGTEXT")

			column(name: "intangible_fixed_asset", type: "VARCHAR(255)")

			column(name: "lead_measure", type: "BIT") {
				constraints(nullable: "false")
			}

			column(name: "legal_case_id", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "measure_classification_id", type: "BIGINT")

			column(name: "origin_of_divestment", type: "VARCHAR(255)")

			column(name: "personnel", type: "VARCHAR(255)")

			column(name: "purchaser_criteria", type: "VARCHAR(255)")

			column(name: "scope_of_divestment", type: "VARCHAR(255)")

			column(name: "tangible_fixed_asset", type: "VARCHAR(255)")

			column(name: "term", type: "VARCHAR(255)")

			column(name: "transitional_service", type: "VARCHAR(255)")

			column(name: "measures_idx", type: "INT")
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-13") {
		createTable(tableName: "measure_classification") {
			column(autoIncrement: "true", name: "id", type: "BIGINT") {
				constraints(nullable: "false", primaryKey: "true")
			}

			column(name: "version", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "measure_classification1", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}

			column(name: "measure_classification2", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}

			column(name: "measure_classification3", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-14") {
		createTable(tableName: "nace") {
			column(autoIncrement: "true", name: "id", type: "BIGINT") {
				constraints(nullable: "false", primaryKey: "true")
			}

			column(name: "version", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "code", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}

			column(name: "description", type: "LONGTEXT")

			column(name: "nace_category_id", type: "BIGINT") {
				constraints(nullable: "false")
			}
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-15") {
		createTable(tableName: "nace_category") {
			column(autoIncrement: "true", name: "id", type: "BIGINT") {
				constraints(nullable: "false", primaryKey: "true")
			}

			column(name: "version", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "short_description", type: "LONGTEXT") {
				constraints(nullable: "false")
			}
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-16") {
		createTable(tableName: "offer") {
			column(autoIncrement: "true", name: "id", type: "BIGINT") {
				constraints(nullable: "false", primaryKey: "true")
			}

			column(name: "version", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "offer_date", type: "DATE") {
				constraints(nullable: "false")
			}
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-17") {
		createTable(tableName: "property") {
			column(autoIncrement: "true", name: "id", type: "BIGINT") {
				constraints(nullable: "false", primaryKey: "true")
			}

			column(name: "version", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "property", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-18") {
		createTable(tableName: "registration_code") {
			column(autoIncrement: "true", name: "id", type: "BIGINT") {
				constraints(nullable: "false", primaryKey: "true")
			}

			column(name: "date_created", type: "DATETIME") {
				constraints(nullable: "false")
			}

			column(name: "token", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}

			column(name: "username", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-19") {
		createTable(tableName: "role") {
			column(autoIncrement: "true", name: "id", type: "BIGINT") {
				constraints(nullable: "false", primaryKey: "true")
			}

			column(name: "version", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "authority", type: "VARCHAR(255)") {
				constraints(nullable: "false")
			}
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-20") {
		createTable(tableName: "search_query") {
			column(autoIncrement: "true", name: "id", type: "BIGINT") {
				constraints(nullable: "false", primaryKey: "true")
			}

			column(name: "version", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "classification", type: "VARCHAR(255)")

			column(name: "date_of_search", type: "DATE") {
				constraints(nullable: "false")
			}

			column(name: "ec_number", type: "BIGINT")

			column(name: "from_decision_year", type: "INT")

			column(name: "search_cases", type: "BIT") {
				constraints(nullable: "false")
			}

			column(name: "short_nace", type: "VARCHAR(255)")

			column(name: "to_decision_year", type: "INT")

			column(name: "user_id", type: "BIGINT") {
				constraints(nullable: "false")
			}

			column(name: "search_term", type: "VARCHAR(255)")

			column(name: "firms", type: "VARCHAR(255)")
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-21") {
		createTable(tableName: "search_query_alternative_remedy") {
			column(name: "search_query_id", type: "BIGINT")

			column(name: "yes_nona", type: "VARCHAR(255)")

			column(name: "alternative_remedy_idx", type: "INT")
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-22") {
		createTable(tableName: "search_query_cluster_sale") {
			column(name: "search_query_id", type: "BIGINT")

			column(name: "yes_nona", type: "VARCHAR(255)")

			column(name: "cluster_sale_idx", type: "INT")
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-23") {
		createTable(tableName: "search_query_competition_concern") {
			column(name: "search_query_id", type: "BIGINT")

			column(name: "competition_concern_string", type: "VARCHAR(255)")

			column(name: "competition_concern_idx", type: "INT")
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-24") {
		createTable(tableName: "search_query_phase") {
			column(name: "search_query_id", type: "BIGINT")

			column(name: "phase_integer", type: "INT")

			column(name: "phase_idx", type: "INT")
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-25") {
		createTable(tableName: "search_query_purchaser_criteria") {
			column(name: "search_query_id", type: "BIGINT")

			column(name: "purchaser_criteria", type: "VARCHAR(255)")

			column(name: "purchaser_criteria_idx", type: "INT")
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-26") {
		createTable(tableName: "search_query_relative_to_so") {
			column(name: "search_query_id", type: "BIGINT")

			column(name: "relative_toso", type: "VARCHAR(255)")
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-27") {
		createTable(tableName: "search_query_relative_toso") {
			column(name: "search_query_id", type: "BIGINT")

			column(name: "relative_toso", type: "VARCHAR(255)")

			column(name: "relative_toso_idx", type: "INT")
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-28") {
		addPrimaryKey(columnNames: "role_id, auth_user_id", tableName: "auth_user_role")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-29") {
		addPrimaryKey(columnNames: "classification_id, property_id", tableName: "classification_property")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-30") {
		addPrimaryKey(columnNames: "firm_id, legal_case_id", tableName: "legal_case_firm")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-31") {
		addPrimaryKey(columnNames: "description_id, legal_case_id", tableName: "legal_case_nace_full_description")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-32") {
		createIndex(indexName: "path", tableName: "attached_file", unique: "true") {
			column(name: "path")
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-33") {
		createIndex(indexName: "username", tableName: "auth_user", unique: "true") {
			column(name: "username")
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-34") {
		createIndex(indexName: "authority", tableName: "role", unique: "true") {
			column(name: "authority")
		}
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-35") {
		addForeignKeyConstraint(baseColumnNames: "legal_case_id", baseTableName: "attached_file", baseTableSchemaName: "casework", constraintName: "FKFC6F1737B3536C8D", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "legal_case", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-36") {
		addForeignKeyConstraint(baseColumnNames: "company_id", baseTableName: "auth_user", baseTableSchemaName: "casework", constraintName: "FK5714100246F41814", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "company", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-37") {
		addForeignKeyConstraint(baseColumnNames: "auth_user_id", baseTableName: "auth_user_role", baseTableSchemaName: "casework", constraintName: "FK4BCFDA9396AA8FD1", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "auth_user", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-38") {
		addForeignKeyConstraint(baseColumnNames: "role_id", baseTableName: "auth_user_role", baseTableSchemaName: "casework", constraintName: "FK4BCFDA93A9F04C0", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "role", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-39") {
		addForeignKeyConstraint(baseColumnNames: "classification_id", baseTableName: "classification_property", baseTableSchemaName: "casework", constraintName: "FKD22DDE0E5746CAF8", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "measure_classification", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-40") {
		addForeignKeyConstraint(baseColumnNames: "property_id", baseTableName: "classification_property", baseTableSchemaName: "casework", constraintName: "FKD22DDE0EB1746F9A", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "property", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-41") {
		addForeignKeyConstraint(baseColumnNames: "deal_type_id", baseTableName: "legal_case", baseTableSchemaName: "casework", constraintName: "FK22859CF6F02E8B33", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "deal_type", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-42") {
		addForeignKeyConstraint(baseColumnNames: "firm_id", baseTableName: "legal_case_firm", baseTableSchemaName: "casework", constraintName: "FK85CEBBE74E822AFA", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "firm", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-43") {
		addForeignKeyConstraint(baseColumnNames: "legal_case_id", baseTableName: "legal_case_firm", baseTableSchemaName: "casework", constraintName: "FK85CEBBE7B3536C8D", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "legal_case", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-44") {
		addForeignKeyConstraint(baseColumnNames: "description_id", baseTableName: "legal_case_nace_full_description", baseTableSchemaName: "casework", constraintName: "FK3358E56D9BCF5F93", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "nace", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-45") {
		addForeignKeyConstraint(baseColumnNames: "legal_case_id", baseTableName: "legal_case_nace_full_description", baseTableSchemaName: "casework", constraintName: "FK3358E56DB3536C8D", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "legal_case", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-46") {
		addForeignKeyConstraint(baseColumnNames: "offer_id", baseTableName: "legal_case_offer", baseTableSchemaName: "casework", constraintName: "FK348609D37595FA3A", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "offer", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-47") {
		addForeignKeyConstraint(baseColumnNames: "legal_case_id", baseTableName: "measure", baseTableSchemaName: "casework", constraintName: "FK37EDA55EB3536C8D", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "legal_case", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-48") {
		addForeignKeyConstraint(baseColumnNames: "measure_classification_id", baseTableName: "measure", baseTableSchemaName: "casework", constraintName: "FK37EDA55E95A7FE57", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "measure_classification", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-49") {
		addForeignKeyConstraint(baseColumnNames: "nace_category_id", baseTableName: "nace", baseTableSchemaName: "casework", constraintName: "FK337955B222EB85", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "nace_category", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-50") {
		addForeignKeyConstraint(baseColumnNames: "user_id", baseTableName: "search_query", baseTableSchemaName: "casework", constraintName: "FK1B7D037126313368", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "auth_user", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}

	changeSet(author: "saqui (generated)", id: "1323425063035-51") {
		addForeignKeyConstraint(baseColumnNames: "search_query_id", baseTableName: "search_query_relative_to_so", baseTableSchemaName: "casework", constraintName: "FKBD069DFB60146EA9", deferrable: "false", initiallyDeferred: "false", onDelete: "NO ACTION", onUpdate: "NO ACTION", referencedColumnNames: "id", referencedTableName: "search_query", referencedTableSchemaName: "casework", referencesUniqueColumn: "false")
	}
}
